package com.xm.bean.context;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 其他调优手段，使用接口抽象：
 *   通过接口隔离依赖，减少直接耦合
 */
public class ServicesBean05 {
}

interface IService{
}

@Component
class ServiceA implements IService{
    @Autowired
    private ServiceB serviceB;
}

@Component
class ServiceB implements IService{
    @Autowired
    private ServiceA serviceA;
}